#include "pcmanager.h"
#include "character.h"
#include "define.h"

CPCManager* CPCManager::_this = nullptr;

CPCManager* CPCManager::GetThis()
{
	return _this;
}

void CPCManager::Init()
{
	_me = new CPC();
	_me->_pvdata.id = GetGuid();
	_pclist.setObject(_me, _me->_pvdata.id);	
}

void CPCManager::Update(ccTime& dt)
{
	//_pclist.begin();
	//CPC* pc = nullptr;
	//while(pc = _pclist.next())
	//{
	//	pc->Update(dt);
	//}
}


CPC* CPCManager::GetMe()
{
	return _me;
}

void CPCManager::InsertPCToPCList(CPC* pc)
{
	_pclist.setObject(pc, pc->_pvdata.id);
}